import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

//ViewUI框架
import ViewUI from "view-design";
import "view-design/dist/styles/iview.css";
Vue.use(ViewUI);

import { Message, Notice, LoadingBar, Modal } from "view-design";
Vue.prototype.$Message = Message;
Vue.prototype.$Notice = Notice;
Vue.prototype.$Loading = LoadingBar;
Vue.prototype.$Modal = Modal;

//Mock数据
require("@/http/mock.js");

//自定义全局组
//显示详情容器
import ShowContainer from "@c/common/ShowContainer.vue";
Vue.component("show-container", ShowContainer);
import ListContainer from "@c/common/ListContainer.vue";
Vue.component("list-container", ListContainer);

Vue.config.productionTip = false;
Vue.prototype.$size = "small";
Vue.prototype.$closePage = path => {
  store.dispatch("tagsView/delTag", path).then(() => {
    router.go(-1);
  });
};
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
